import { request } from 'umi';

export async function listServiceEnv() {
    return request<API.ServiceEnvironment>("/api/env", {
        method: "GET",
    })
}

export async function triggerCalculation(options?: { [key: string]: any }) {
    return request<API.BillingServiceCalculationResponse>("/api/calculation", {
        method: "POST",
        ... (options || {})
    })
}

export async function getLogOfBillingService() {
    return request<API.ServiceLog>("/api/original-service/log", {
        method: "GET"
    })
}